"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * typeof
 */
let student = {
    id: 1,
    name: "xiaowang",
    address: "武侯区"
};
let student2 = {
    id: 2, name: "xiaowang", address: "高新区"
};
function toArray(x) {
    return x;
}
function getKey(obj, key) {
    // const key2 = "address"
    // const key2 = keyof IObj
    return obj[key];
    return obj[key];
}
//获取指定的属性值，扩展性更高
function getValueByKey(obj, key) {
    return obj[key];
    obj.id;
}
getValueByKey(student, "id");
const obj = {
    id: 1,
    name: "xiaowang",
    weight: 120,
    children: [
        1, 2, 3
    ]
};
const p1 = {
    id: "2",
    name: "xiaofei",
    weight: "120",
    children: "[1,2,3]"
};
